﻿@using HynuIOTA.Web.Models

@{
    Layout = null;
    List<NavChannelViewModel> navList = ViewBag.navs as List<NavChannelViewModel>;
}

<ul class="nav">
    @{
        foreach (var item in navList)
        {
            <li>
                <a href="@Url.Content(item.Link)">@item.Name</a>
                @if (item.SonNavChannel != null && item.SonNavChannel.Any())
                {
                    <ul class="sub-nav">
                        @foreach (var son in item.SonNavChannel)
                        {
                            <li><a href="@Url.Content(son.Link)">@son.Name</a></li>
                        }
                    </ul>
                }
            </li>
        }
    }
</ul>
<script>
    $(".nav>li").hover(function () {
        $(this).children('ul').stop(true, true).show(300);
    },function () {
        $(this).children('ul').stop(true, true).hide(300);
    });
</script>
